const express = require('express');
const asyncHandler = require('express-async-handler');
const basicController = require('../controllers/basic.controller')
const router = express.Router();
module.exports = router;

//获取当前工地进度信息

//获取指定楼栋进度详细信息

//根据搜索内容获取对应的楼面进度信息
router.post('/getProgressWithType', asyncHandler(getProgressWithType));
router.post('/getCurrentProgressInfo',asyncHandler(getCurrentProgressInfo))


async function getProgressWithType(req,res){
   let result = await basicController.getProgressWithType(req.body) 
   res.json(result)
}

async function getCurrentProgressInfo(req,res){
   let result =await basicController.getProgressByDuration(req.body)
   res.json(result)
}